import { StrictMode, Suspense } from 'react'
import { createRoot } from 'react-dom/client'
import './index.css'
import { RouterProvider } from 'react-router-dom'
import routes from './router'
import { Provider } from 'react-redux'
import store from './store'
import './locale/i18n'

createRoot(document.getElementById('root')!).render(
  <StrictMode>
    <Provider store={store}>
      <Suspense fallback={<>...loading...</>}>
        <RouterProvider router={routes}></RouterProvider>
      </Suspense>
    </Provider>
  </StrictMode>,
)
